package com.example.demo11.dao;

import com.example.demo11.entity.Role;
import java.util.List;
import java.util.Map;

public interface RoleDao {

    int add(Role user);

    int update(Role user);

    List<Map<String, Object>> findByName(String name);

    //根据id查找
    Role findById(Integer id);

    //根据id删除
    int delete(Integer id);

    List<Map<String, Object>> findRoleByUserName(String name);

    List<Map<String, Object>> findUserByRoleName(String name);

    List<Map<String, Object>> findUserByRoleId(Integer id);

    List<Map<String, Object>> findAll(Integer page);

    List<Map<String, Object>> findRoleByUserId(Integer id);
}